import request from '@/utils/request'

// 获取分类列表
export function getList(params) {
  return request.get('/categories', { params })
}

// 获取分类数量
export function getQuantity(params) {
  return request.get('/categories/count', { params })
}

// 新建分类
export function addQuantity(data) {
  return request.post('/categories', data)
}

// 删除分类
export function delQuantity(id) {
  return request.delete('/categories/' + id)
}

// 编辑分类
export function editQuantity(data) {
  return request.put('/categories/' + data.id, data)
}

// 获取指定分类
export function lookQuantity(id) {
  return request.get('/categories/' + id)
}
